home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / spitfire / dcbchkup.zip / DCBCHKUP.DOC < prev    next >
Text File  |  1993-03-14  |  14KB  |  311 lines

  1.                            The Dark Corner BBS
  2.                            Ross Cassell-SysOp
  3.                            Fidonet (1:3652/3)
  4.  
  5.  
  6. CHKUP.BAT For SFCHKUP! Sfchkup Written By Mike Woltz, Author Of Spitfire
  7.  
  8. With The Ever Increasing Popularity Of The Electronic Bulletin Board And
  9. What Can Be Done On It, As Far As Files And Such, Comes The Risks Of CPU
  10. Viral Infections And The Like.. It Seems Like People Enjoy Taking A Hobby
  11. And Making It As Dangerous For Everyone As It Is To Cross The Street.
  12.  
  13. With the Increasing Dangers Of VIral Infections To Both Your System And/Or
  14. Your End Users, Comes The Advent Of Virus Scanning Software And Software
  15. Used In Conjunction With Virus Scanning Software. In The Past Few Years There
  16. Has Been Utilities Us BBS SysOps Can Utilize To Scan And Screen Files Uploaded
  17. To Our Systems For Errors/Viruses! For The Most Part These Utilities Were
  18. Clumsy, Had To Be Updated Alot And In Some Cases Wasted the Users Time Online
  19. To Perform These Tests. It Makes Little Sense To Reward A Caller With Time
  20. For A Upload, Only To Take That Time Away To Test His/Her Upload While They
  21. Were Still Online!
  22.  
  23. In Comes SFCHKUP, Written By Mike Woltz! A Small Easy To Use And Extremely
  24. Fast Utility! SFCHKUP Is Designed To Be Run When A Caller Is Not Online In
  25. One Of Two Ways. First Way Is That It Is Executed In A Batch File After The
  26. Caller Logs Off. Most Often In SFINIT.BAT. Like So..
  27. @ECHO OFF
  28. SFCHKUP %1
  29. Then Any Other Commands You Use.
  30.  
  31. SFINIT.BAT Is Called By Spitfire After Each Call, Then After Execution Spitfire
  32. Returns To "Ready For Caller". It Is Advised Per The SFCHKUP Documentation To
  33. Make SFCHKUP The First Command In SFINIT.BAT. If The Previous Caller Uploaded
  34. File<s>, SFCHKUP Will See This And Start Performing The Tests On The Files It
  35. Finds In The Configured Upload Directory. If No Files Were Present Or Uploaded
  36. By The Previous Caller, SFCHKUP Will Not Start Processing.
  37.  
  38. In The Event You Are Running Your BBS Underneath A Frontend Loader Such As
  39. FRONTDOOR Or Binkleyterm, Spitfire When Run This Way Does Not Call SFINIT.BAT.
  40. You Can Get Around This By Placing A Call Command For SFINIT.BAT At the End Of
  41. Your Batch File That You Use For Spitfire Prior To It Returning Control To Your
  42. Frontend Loader, Like So:
  43. :EVENT_L
  44.   REM Place EVENT L Commands Here
  45.   GOTO LOOP
  46. :END
  47.   CALL SFINIT.BAT
  48.  
  49. The Above Method Is The Ideal And Preferred Method Of Using SFCHKUP..
  50. There Is A Second Way It Can Be Run. As A Maintainance EVENT Or From The
  51. DOS Command Line.
  52.  
  53. Setting Up SFCHKUP Is Relatively Simple And You Can Refer To Its Documentation
  54. On How. The TESTS SFCHKUP Can Perform Totally Depends On You. SFCHKUP Relies On
  55. A Batch File Called CHKUP.BAT. In CHKUP.BAT Would Be The Commands To Search Your
  56. Upload Directory For Uploads And Test/Scan Them etc etc.. How Well SFCHKUP Does
  57. Its Job For You, Depends On Your Ability To Write A Batch File And The Commands
  58. You Put In It! SFCHKUP Does Not Require You To Be A Programmer Or Have A College
  59. Education. Since Its Release, I Have Seen People Say, I Cant Get It To Work Etc...
  60. I Thought I Would Give Out My CHKUP.BAT!
  61.  
  62. My Setup Does Not Require To Many Utilities, To Run With, And It Is Assumed
  63. That Most BBS SysOps Have The Major File Archivers On Hand Residing In A
  64. Directory Sitting In Their Path. SFCHKUP.EXE, SFCHKUP.DAT And CHKUP.BAT Must
  65. Reside In The Home Directory Of Your Spitfire Node Or Nodes.
  66.  
  67. Since The Release Of The Newest PKZIP/PKUNZIP <v204g> I Have Since Converted
  68. All My Files To It, Including ARJ's And ZIP Files Zipped With v1.10 Of Pkzip.
  69. I Use A Unique Approach To Accomplish This Goal On Uploads. Those Of You
  70. Familair With ARJ Utility, Know That In It Is A File Called REARJ. This Utility
  71. Can Be Used To Convert ARCHIVES From One Format To Another As Well At The Same
  72. Time Perform A Virus Scan On It, Using SCAN.EXE. IF I Have A ARJ File Uploaded
  73. REARJ Backs The File Up, Extracts It, Scans The File For Virii Then Converts
  74. The Archive To ZIP. If The File Passes, The Backup File Is Deleted And We Have
  75. Success.
  76.  
  77. Enough Wind, I Will Explain My CHKUP.BAT Below..
  78.  
  79. **Note**
  80. This Batch File Is Written For My Setup, If You Choose To Use It, Some Editting
  81. May Be Necessary To Reflect Paths,Directory Locations And Names.
  82.  
  83. @ECHO OFF
  84.   D:
  85.   CD\CHKUP1
  86.   MD CHKWORK
  87. REM This Portion Changes To Drive D, Switches To The Directory Containing My
  88. REM Uploads And Creates A Temporary Work Directory, Where All Testing Occurs.
  89. REM The @ECHO OFF, Simply Suppresses The Batch File Output To Screen.
  90. :TOP
  91.   C:\UTILS\MUV %1%2 D:\CHKUP1\CHKWORK
  92.   CD\CHKUP1\CHKWORK
  93.   IF EXIST *.ARJ GOTO ARJ
  94.   IF EXIST *.ZIP GOTO ZIP
  95.   IF EXIST *.LHA GOTO LZH
  96.   IF EXIST *.LZH GOTO LZH
  97.   IF EXIST *.ZOO GOTO ZOO
  98.   IF EXIST *.EXE GOTO EXE
  99.   GOTO END
  100. REM This Portion Moves The Uploaded File At A One At A Time Basis To The
  101. REM Test Directory, Then We Change Directory To That Directory. Please Note
  102. REM I Am Using Mike Woltz's Move File Utility Called MUV. The %1 Represents
  103. REM The File Name, %2 Represents The File Extension. These Parameters Are
  104. REM Passed To The This Batch File By SFCHKUP. The If Exist Statements Then
  105. REM Determine What Type Of File It Is And Points To Another Part Of This
  106. REM Batch File For Processing.
  107. :ARJ
  108.   C:\UTILS\REARJ %1.ARJ /TZIP /D /A /V
  109.   IF ERRORLEVEL 6 GOTO BAD
  110.   IF ERRORLEVEL 13 GOTO BAD
  111.   GOTO ZIP
  112. LZH
  113.   IF EXIST %1.LHA RENAME %1.LHA %1.LZH
  114.   C:\UTILS\REARJ %1.LZH /TZIP /D /A /V
  115.   IF ERRORLEVEL 6 GOTO BAD
  116.   IF ERRORLEVEL 13 GOTO BAD
  117.   GOTO ZIP
  118. :ZOO
  119.   C:\UTILS\REARJ %1.ZOO /TZIP /D /A /V
  120.   IF ERRORLEVEL 6 GOTO BAD
  121.   IF ERRORLEVEL 13 GOTO BAD
  122.   GOTO ZIP
  123. REM If The Files To Be Processed Fall Into The Above Labels, This Portion
  124. REM Extracts The Files From The Archive, Scans Them For Virii, Then Converts
  125. REM The Parent Archive To The New Version Of PKZIP. If The File Cannot Be
  126. REM Successfully Extracted Or It Fails The Virus Scan, REARJ Will Exit With A
  127. REM Errorlevel That These Labels Will Use To Point To Another Section Of This
  128. REM Batch File For Further Processing. If The File Passes, You Will Notice That
  129. REM Successful Files Are Then Passed Over To The ZIP Label For Further Tests.
  130. REM Note That When REARJ Starts The Conversion Process It Makes A Backup File.
  131. REM Then Deletes The Backup File If Conversion Is Successful, REARJ Does Test
  132. REM The New Archive To See If It Compressed Correctly And Can Be Decompressed
  133. REM Correctly. Furthermore During The Conversion Process, If The Parent Archive
  134. REM Contained Embedded Archives, Then Those Archives Will To Be Converted To
  135. REM The New ZIP!
  136. :ZIP
  137.   C:\UTILS\PKUNZIP %1.ZIP
  138.   IF ERRORLEVEL 1 GOTO BAD
  139.   IF EXIST PKZIP.EXE DEL PKZIP.EXE
  140.   IF EXIST PKUNZIP.EXE DEL PKUNZIP.EXE
  141.   IF EXIST COMMAND.COM DEL COMMAND.COM
  142.   C:\UTILS\SCAN *.* /NOMEM
  143.   IF ERRORLEVEL 1 GOTO BAD
  144.   IF EXIST %1.ZIP DEL %1.ZIP
  145.   C:\UTILS\PKZIP %1.ZIP *.*
  146.   C:\UTILS\DELXCEPT %1.ZIP
  147.   C:\UTILS\RECOM -S C:\UTILS\COMMENT.FIL %1.ZIP
  148.   GOTO MOVE
  149. REM This Label Will Perform Tests On Inbound ZIP Files And Retest Any ZIP
  150. REM File Converted Earlier In This Batch File. This Label Insures That All
  151. REM ZIPS Will Be Converted Over To The New Zip. First I Use PKUNZIP To Extract
  152. REM All The Files From The ZIP. If PKUNZIP Cannot Extract, It Will Exit With
  153. REM Errorlevel 1, Which In Turn Will Point To Another Section Of This Batch
  154. REM File For Processing. I Then Test To See If The Archives Contents Contained
  155. REM PKZIP.EXE,PKUNZIP.EXE Or COMMAND.COM. If Found These 3 Files Will Be Deleted
  156. REM The Reason For Doing This Is That Some Users Out Of Innocent Ignorance Or
  157. REM Malicious Prank Include These In Files They Upload. This Way Insures That
  158. REM During Conversion Process That Unneeded Files Are Omitted From The Parent
  159. REM Archive And Your Testing Goes By Flawlessly.
  160. REM A Virus Scan Is Then Performed On The Files. If The Files Fail, SCAN Will
  161. REM Exit With Errorlevel 1, Again Pointing To Another Section Of This Batch
  162. REM File For Processing. If The File Passes The Virus Scan The Original ZIP
  163. REM File Is Then Deleted. I Then REZIP It With The NEW PKZIP. Then Using Mike
  164. REM Woltz's DELXCEPT Utility, I DELETE All Files In The CHKWORK Directory Except
  165. REM For The NEWLY Created ZIP. Then I Add My BBS Comment Using RECOM, And Then
  166. REM I Point To Another Section Of The Batch File For Final Processing.
  167. :EXE
  168.   MUV %1.EXE D:\HOLD
  169.   GOTO TOP
  170. REM If The File To Be Tested Is A EXE, It Can Be Assumed That The File Is
  171. REM Either A Self Extracting Archive Or The Uploader Is Fairly Wet Behind
  172. REM The Ears, And Is Uploading You A Program, One File At A Time<g>. This
  173. REM Portion Simply Moves All EXE Files To A Directory That Exists On A
  174. REM Permanent Basis, For The SysOp To Do Manual Testing. In My Case, I Use
  175. REM A Directory Called HOLD, To Hold Any EXE Files.
  176. :BAD
  177.   C:\UTILS\MUV %1%2 D:\BADCHKUP
  178.   C:\UTILS\DELXCEPT %^$$^%!!.%^$
  179.   GOTO TOP
  180. REM Files That Failed Either Extraction Or A Virus Scan Are Processed From
  181. REM This BATCH Label.. These Files Are Simply Moved To A Directory Called
  182. REM BADCHKUP. The SysOp Can Review These Files And Determine Their Fate.
  183. REM SFCHKUP Will Subsequently Alert The Uploader Of The Failed File. I Then
  184. REM USE Mike Woltz's DELXCEPT Utility To Make Sure All Files Are Removed From
  185. REM The CHKWORK Directory.
  186. :MOVE
  187.   IF EXIST %1.ZIP MUV %1.ZIP D:\CHKUP1
  188.   GOTO TOP
  189. REM Files That Have Passed All Testing Are Returned To The Original Upload
  190. REM Directory Where SFCHKUP Will Move Them To The Directory You Have Configured
  191. REM For Tested Uploads. Please Note, That If The File Size And Extension Changed
  192. REM During Testing, SFCHKUP Will Correct It. Also If The ZIP Contains A File
  193. REM Called FILE_ID.DIZ, SFCHKUP Will Extract FILE_ID.DIZ And Use It For The File
  194. REM Description In SFFILES.BBS. **NOTE** Will Use As Much Of FILE_ID.DIZ As It
  195. REM Can Depending On How Many Lines FILE_ID.DIZ Contains Or What You Have Setup
  196. REM In Spitfire For Number Of File Description Lines. Also SFCHKUP Will Not
  197. REM Append To Or Alter A SFFILES.BBS If The Tested File Was Uploaded To SysOp
  198. REM Only. It Will However Use The HEYSYSOP.LOG.
  199. :END
  200.   CD\CHKUP1
  201.   RD CHKWORK
  202.   C:
  203.   CD\SF
  204. REM After There Are No More Files To Process, This Part Of The Batch File Is
  205. REM Called And The Temporary Test Directory Is Removed, We Then Return To
  206. REM The SF Home Directory On Drive C.
  207.  
  208. This Process Is Rather Simple, Straight Forward And Get The Job Done!
  209. There Is Certainly A Better Way Than Mine, But For Starters You Have
  210. Something To Build On And Refer To.
  211.  
  212. There Are A Few Things To Take Note Of..
  213. In This Batch File You Will Notice I Call The Utilities Used, With The
  214. Pathname They Reside From. This Is To Insure That My Utilities Are Being
  215. Used To Perform Tests On Or Convert The Files To. This Prevents The Same
  216. Files That May Have Been Accidentally Or Purposely Included In These Archives
  217. From Performing These Tests. When Executing Any Program, DOS Will Search The
  218. Current Directory First Before It Searches The PATH.
  219.  
  220. Also In Sections Of This Batch File, You See %1 And %2 In Use. %1 Is The
  221. Filename And %2 Is The Extension. Otherwards... If MYFILE.ZIP Was Uploaded,
  222. SFCHKUP Would Pass Myfile.Zip To CHKUP.BAT. CHKUP.BAT Would See MYFILE As %1
  223. And ZIP As %2. Also Do Not Worry, If There Is 6 Files To Be Tested, SFCHKUP
  224. Tests The Files One At A Time.
  225.  
  226. You Will Need The Following Utilities In Addition To SFCHKUP To Run With:
  227. PKZIP.EXE And PKUNZIP.EXE
  228. Latest Versions Preferably, Although You Do Not Have To Have, Since This
  229. Batch File Will Operate Fine With Any Version You Prefer
  230. THE MAJOR ARCHIVERS
  231. Good Idea To Have Them All So You Can Handle Whatever Comes Your Way. If You
  232. Are Picky, You Can Alter This Batch File To Test Archives I Am Not Testing For,
  233. Or Leave Out Certain Archives. If You Do Omit Certain Archives. Make Sure That
  234. You Edit Your SFNOUP.DAT File Accordingly To Prevent Your Callers From Uploading
  235. Those File Types.
  236. MUV20.ZIP
  237. Mike Woltz's Move A File Utility
  238. DELXCEPT.ZIP
  239. Mike Woltz's DELXCEPT ??? File Utility.
  240. SCANV???.ZIP
  241. Mcafees Virus Scanner, Obtain The Latest Versions!
  242. RECOM105.ZIP
  243. This Utility Will Replace A ZIP Files Comment With One Of Your Own. In The Event
  244. You Do Not Wish To Inbed Your ZIP Files With A ZIP Comment. You Can Use A
  245. Utility Called Stripzip To At Least Remove Any Existing Zip Comments. If You Do
  246. Decide To Use STRIPZIP, Edit CHKUP.BAT Accordingly.
  247. REARJ.EXE
  248. This Utility Comes With The ARJ Package, (ARJXXXX.EXE, Where X Is Reflects The
  249. Current Version. I Am Running On V2.30, I Understand That There Are Several Beta
  250. Copies Circulating Around For A Future Revision) REARJ.EXE Uses A Config File
  251. Called REARJ.CFG, I Have Included My REARJ.CFG File. I Cannot Include Any Other
  252. Utility. The Enclosed REARJ.CFG File Is Ready To Go..
  253.  
  254. Furthermore, You Need To Make Sure That All The Utilities You Plan To Use
  255. Reside In A Permanent Directory Residing Somewhere In Your Path Statement.
  256. You Also Must Have Directories Set Up To:
  257. Receive New Files Uploaded (Required)
  258. Receive Files That Pass Testing (Required)
  259. Receive EXE Files (Optional)
  260. Receive Failed Files (Required)
  261. That You Read The Instructions. (Always A Good Idea!)
  262.  
  263. Credits:
  264. Special Thanks Goto Mike Woltz For Writing Tremendously Superior BBS Software
  265. And Easy To Use Utilities.
  266.  
  267. And To Those Spitfire SysOps Who Along The Way Guided Me In Configuring And
  268. Using SFCHKUP!
  269.  
  270. SPITFIRE
  271. SFCHKUP
  272. MUV
  273. DELXCEPT
  274.  
  275. Are Registered Tradmarks Of Mike Woltz Of Buffalo Creek Software.
  276.  
  277. PKZIP/PKUNZIP
  278.  
  279. Are Registered Trademarks Of Phil Katz Of PKWARE
  280.  
  281. ARJ/REARJ
  282.  
  283. Are Registered Trademarks Belonging To Robert K Jung
  284.  
  285. RECOM
  286.  
  287. Is A Registered Trademark Of Michael C Loewen
  288.  
  289. ***
  290. The Above Mentioned Utilities, Can Be Obtained From Buffalo Creeks BBS Or
  291. Your Favorite Neighborhood Spitfire BBS!
  292.  
  293. If You Have A Question, Problem Or Comment. You Can Direct It To Me Or Any
  294. Spitfire SysOp!!!
  295.  
  296. I Can Be Reached At My BBS:
  297.  
  298. The Dark Corner BBS
  299. (803)573-7069
  300. 14400 v32b v42b..
  301.  
  302. Or On Buffalo Creeks BBS
  303.  
  304. Or On FIDONET (1:3652/3)
  305.  
  306. ***
  307. Support Spitfire, Support Greatness!
  308.  
  309. The End <G>!!
  310.  
  311.